#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Lee
# File: setting.py
# Time: 2022/9/23 14:14
import os.path


# 配置启动信息
import time

caps = {}
caps['platformName'] = 'Android'
caps['platformVersion'] = '9'
caps['deviceName'] = 'emulator-5554'
caps['automationName'] = 'UiAutomator2'
caps['appPackage'] = 'com.ibox.calculators'
caps['appActivity'] = 'com.ibox.calculators.CalculatorActivity'
caps['noReset'] = True

# 默认等待总时长，单位：s
LOCATE_TIME = 15
# 检测元素是否已定位到的间隔时间，单位：s
POLL_FREQUENCY = 0.3

# 获取当前日期
TODAY = time.strftime('%Y%m%d', time.localtime())

# 项目根目录
BASE_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

# 测试数据存放路径
TEST_DATA_PATH = os.path.join(BASE_PATH, 'testdata')

# 日志存放地址
ERR_LOG_PATH = os.path.join(BASE_PATH, f'output\\log\\err_log{TODAY}.txt')

# 常规日志存放地址
GEN_LOG_PATH = os.path.join(BASE_PATH, f'output\\log\\gen_log{TODAY}.txt')
